<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<body>
<ol class="page-navigator" th:fragment="pageNav(pageInfo, prevText, nextText, prefix, params)">
    <th:block th:if="${pageInfo.hasPreviousPage}">
        <li class="prev">
            <a th:href="@{${prefix} + '?page=' + ${pageInfo.prePage} + '&content=' + ${params}}" th:text="${prevText}"></a>
        </li>
    </th:block>

    <th:block th:each="navIndex :${pageInfo.navigatepageNums}">
        <li th:class="${pageInfo.pageNum == navIndex} ? 'current' : '' ">
            <a th:href="@{${prefix} + '?page=' +  ${navIndex} + '&content=' + ${params}}" th:text="${navIndex}"></a>
        </li>
    </th:block>

    <th:block th:if="${pageInfo.hasNextPage}">
        <li class="next">
            <a th:href="@{${prefix} + '?page=' + ${pageInfo.nextPage} + '&content=' + ${params}}" th:text="${nextText}"></a>
        </li>
    </th:block>
</ol>

<div th:fragment="pageAdminNav(pageInfo)">
    <div class="clearfix">
        <ul class="pagination m-b-5 pull-right">
            <li th:if="${pageInfo.hasPreviousPage}">
                <a aria-label="Previous" th:href="@{'?page=' + ${pageInfo.prePage}}"> <i class="fa fa-angle-left"></i>&nbsp;上一页 </a>
            </li>

            <th:block th:each="nav : ${pageInfo.navigatepageNums}">
                <li th:class="${nav == pageInfo.pageNum}?'active':''">
                    <a th:href="@{'?page=' + ${nav}}" th:text="${nav}"></a>
                </li>
            </th:block>

            <th:block th:if="${pageInfo.hasNextPage}">
                <li>
                    <a aria-label="Next" th:href="@{'?page=' + ${pageInfo.nextPage}}"> 下一页&nbsp;<i class="fa fa-angle-right"></i> </a>
                </li>
            </th:block>
            <li><span th:text="'共' + ${pageInfo.pages} + '页'"></span></li>
        </ul>
    </div>
</div>

</body>
</html>